{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Imports\n",
    "\n",
    "Import all the modules and functionalities we need."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "\n",
    "# Import standard libraries.\n",
    "import os\n",
    "\n",
    "# Import third party libraries.\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "from scipy.stats import stats\n",
    "import seaborn as sns\n",
    "from statsmodels.stats.multitest import multipletests\n",
    "\n",
    "# Import custom libraries/scripts.\n",
    "import annotations\n",
    "import helpers"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Loading data\n",
    "\n",
    "Fetch all our relevant data for the current analysis."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Set working contants.\n",
    "EXPERIMENTS_PATH = r'\\\\10.40.12.80\\home\\PhD\\Results\\Competition\\DL\\Four-Arena Setup\\WT_mating_status\\processed'\n",
    "FPS = 60\n",
    "N_MINUTES = 60\n",
    "N_FRAMES = N_MINUTES * 60 * FPS\n",
    "INK = 'black'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Set figure configurations.\n",
    "sns.set(\n",
    "        context='paper',\n",
    "        style='ticks',\n",
    "        font='sans-serif',\n",
    "        font_scale=1.0, \n",
    "        rc={\n",
    "            'axes.axisbelow': True,\n",
    "            'axes.edgecolor': INK,\n",
    "            'axes.facecolor': 'white' if INK=='black' else 'black',\n",
    "            'axes.grid': False,\n",
    "            'axes.labelcolor': INK,\n",
    "            'axes.labelsize': 13.0,\n",
    "            'axes.labelweight': 'normal',\n",
    "            'axes.linewidth': 1.0,\n",
    "            'axes.spines.left': True,\n",
    "            'axes.spines.bottom': True,\n",
    "            'axes.spines.top': False,\n",
    "            'axes.spines.right': False,\n",
    "            'axes.titlepad': 15.0,\n",
    "            'axes.titlesize': 20.0,\n",
    "            'axes.titleweight': 'bold',\n",
    "            'figure.facecolor': 'white' if INK=='black' else 'black',\n",
    "            'figure.figsize': [6.0, 4.0],\n",
    "            'figure.titlesize': 30.0,\n",
    "            'figure.titleweight': 'bold',\n",
    "            'font.family': ['sans-serif'],\n",
    "            'font.sans-serif': ['Arial'],\n",
    "            'legend.frameon': False,\n",
    "            'legend.fontsize': 11.0,\n",
    "            'lines.color': INK,\n",
    "            'lines.linewidth': 1.0,\n",
    "            'patch.edgecolor': INK,\n",
    "            'savefig.dpi': 300,\n",
    "            'savefig.format': 'png',\n",
    "            'savefig.bbox': 'tight',\n",
    "            'savefig.transparent': True,\n",
    "            'text.color': INK,\n",
    "            'text.usetex': False,\n",
    "            'xtick.color': INK,\n",
    "            'xtick.direction': 'out',\n",
    "            'xtick.labelsize': 12.0,\n",
    "            'xtick.major.pad': 5.0,\n",
    "            'xtick.major.size': 0.0,\n",
    "            'xtick.major.width': 1.0,\n",
    "            'xtick.minor.size': 0.0,\n",
    "            'xtick.minor.width': 0.4,\n",
    "            'ytick.color': INK,\n",
    "            'ytick.direction': 'out',\n",
    "            'ytick.labelsize': 12.0,\n",
    "            'ytick.major.pad': 5.0,\n",
    "            'ytick.major.size': 3.0,\n",
    "            'ytick.major.width': 1.0,\n",
    "            'ytick.minor.size': 0.0,\n",
    "            'ytick.minor.width': 0.4\n",
    "           }\n",
    "       )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Folder already exists, skipping.\n"
     ]
    }
   ],
   "source": [
    "# Prepare the Figures folder to save our graphs in.\n",
    "savepath = os.path.join(r'C:\\Users\\Miguel\\Desktop\\paper_data', 'paper_figures', 'figure3')\n",
    "try:\n",
    "    os.makedirs(savepath)\n",
    "    print('New folder created.')\n",
    "except FileExistsError:\n",
    "    print('Folder already exists, skipping.')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Paths to conditions:\n",
      " ['\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added', '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h', '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h', '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin']\n"
     ]
    }
   ],
   "source": [
    "# Set the conditions to analyze.\n",
    "condition_order = ['virgin_virgin', 'virgin_mated24h', 'virgin_mated2h', 'virgin_added']\n",
    "conditions = [item.path for item in os.scandir(EXPERIMENTS_PATH) if item.name in condition_order]\n",
    "print('Paths to conditions:\\n', conditions)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['video_2017-09-07T13_28_02_arena2_slice1', 'video_2017-09-27T15_06_20_arena1_slice1', 'video_2017-09-28T14_44_01_arena1_slice1', 'video_2017-10-19T14_58_20_arena2_slice1', 'video_2017-10-26T14_43_16_arena1_slice1', 'video_2017-09-05T14_34_55_arena4', 'video_2017-09-12T14_36_55_arena4', 'video_2017-09-14T13_34_41_arena2', 'video_2017-09-21T14_47_10_arena3', 'video_2017-09-21T14_47_10_arena4', 'video_2017-09-26T13_40_19_arena4', 'video_2017-09-27T16_21_07_arena1', 'video_2017-09-27T16_21_07_arena3', 'video_2017-09-28T15_55_49_arena2', 'video_2017-10-12T14_34_41_arena2', 'video_2017-10-18T14_05_05_arena3', 'video_2017-10-19T14_58_20_arena1', 'video_2017-10-24T14_48_34_arena1', 'video_2017-10-24T14_48_34_arena4', 'video_2017-10-25T13_39_35_arena4', 'video_2017-11-03T14_54_45_arena2', 'video_2017-09-05T15_42_04_arena1', 'video_2017-11-02T16_11_06_arena1', 'video_2017-12-19T16_23_33_arena4', 'video_2017-09-05T15_42_04_arena3', 'video_2017-09-07T13_28_02_arena4']\n",
      "26\n"
     ]
    }
   ],
   "source": [
    "# Create a list of all the experiments that we DO NOT want to analyze.\n",
    "intruders = []\n",
    "for condition_path in conditions:\n",
    "    condition = os.path.basename(condition_path)\n",
    "    for file in os.listdir(condition_path):\n",
    "        if 'quality_control' in file:\n",
    "\n",
    "            # Read the quality.csv file to check which experiments are usable for analysis.\n",
    "            quality_file = os.path.join(condition_path, file)\n",
    "            quality_df = pd.read_csv(quality_file, usecols=[0,1], index_col=0)\n",
    "            quality_df = quality_df[quality_df['is_usable'] == False].index.values\n",
    "\n",
    "            for value in quality_df:\n",
    "                intruders.append(value + '_slice1' if condition=='virgin_added' else value)\n",
    "\n",
    "print(intruders)             \n",
    "print(len(intruders))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\t\n",
      " virgin_added\n",
      "\t\n",
      " virgin_mated24h\n",
      "Copulation too short: video_2017-09-20T14_48_55_arena3\n",
      "\t\n",
      " virgin_mated2h\n",
      "\t\n",
      " virgin_virgin\n",
      "Copulation too short: video_2017-09-06T13_42_13_arena3\n",
      "Copulation too short: video_2017-09-26T14_52_18_arena3\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'virgin_virgin': ['\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-05T13_28_41_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-05T14_34_55_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-06T13_42_13_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-06T14_45_32_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-07T14_37_38_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-07T14_37_38_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-08T13_26_13_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-12T13_30_06_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-12T14_36_55_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-12T16_18_15_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-13T14_34_18_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-20T13_43_53_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-20T14_48_55_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-21T13_38_55_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-21T15_57_23_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-26T13_40_19_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-28T13_36_06_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-28T14_44_01_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-28T15_55_49_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-12T15_50_43_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-13T16_06_33_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-18T15_19_17_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-19T13_50_56_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-20T13_21_06_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-20T15_44_09_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-24T16_13_35_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-25T14_55_12_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-11-02T13_37_48_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-11-02T14_48_28_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-11-02T16_11_06_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-11-03T14_54_45_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-11-03T16_20_50_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-12-20T12_58_51_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-12-20T14_01_01_arena3'],\n",
       " 'virgin_mated24h': ['\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-05T13_28_41_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-07T16_01_26_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-08T14_31_59_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-08T14_31_59_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-12T13_30_06_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-13T15_40_03_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-14T14_47_16_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-20T13_43_53_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-26T14_52_18_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-27T15_06_20_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-11T13_30_05_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-11T16_00_50_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-13T14_37_35_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-13T14_37_35_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-13T14_37_35_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-19T13_50_56_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-19T14_58_20_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-19T16_19_37_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-20T14_31_24_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-20T14_31_24_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-24T13_43_26_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-25T13_39_35_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-25T14_55_12_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-25T14_55_12_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-26T13_35_36_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-26T14_43_16_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-11-03T13_38_06_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-11-03T13_38_06_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-11-03T13_38_06_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-11-03T16_20_50_arena3'],\n",
       " 'virgin_mated2h': ['\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-06T15_53_34_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-07T16_01_26_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-07T16_01_26_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-08T15_42_18_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-08T15_42_18_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-13T15_40_03_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-14T15_53_40_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-20T16_07_55_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-21T15_57_23_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-21T15_57_23_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-26T16_06_31_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-26T16_06_31_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-28T15_55_49_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-11T16_00_50_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-11T16_00_50_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-11T16_00_50_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-12T15_50_43_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-13T16_06_33_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-18T16_37_02_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-18T16_37_02_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-19T16_19_37_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-19T16_19_37_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-25T16_23_26_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-25T16_23_26_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-11-02T16_11_06_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-19T15_13_55_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-19T15_13_55_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-19T16_23_33_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-19T16_23_33_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-19T16_23_33_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-20T15_08_53_arena2'],\n",
       " 'virgin_added': ['\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-05T13_28_41_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-05T13_28_41_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-06T13_42_13_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-06T14_45_32_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-06T14_45_32_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-08T13_26_13_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-08T13_26_13_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-12T14_36_55_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-12T16_18_15_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-12T16_18_15_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-13T13_31_57_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-20T16_07_55_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-20T16_07_55_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-21T13_38_55_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-21T14_47_10_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-26T16_06_31_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-11T14_44_35_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-11T14_44_35_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-12T13_31_34_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-13T13_32_39_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-18T16_37_02_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-18T16_37_02_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-19T13_50_56_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-20T14_31_24_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-20T14_31_24_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-26T14_43_16_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-26T16_04_34_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-26T16_04_34_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-11-02T14_48_28_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-11-02T14_48_28_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-12-20T12_58_51_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-12-20T14_01_01_arena2']}"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Load all usable experiments for each condition.\n",
    "experiments = {condition: [] for condition in condition_order}\n",
    "\n",
    "for condition_path in conditions:\n",
    "    \n",
    "    condition = os.path.basename(condition_path)\n",
    "    print('\\t\\n', condition)\n",
    "    \n",
    "    for item in os.scandir(condition_path):\n",
    "        if item.is_dir() and item.name not in intruders:\n",
    "            \n",
    "            annotation_video = annotations.read(item.path.split('_slice')[0] + '.csv')\n",
    "            \n",
    "            try:\n",
    "                copulation = annotation_video[0].events[0]\n",
    "\n",
    "                # Filter out videos where copulation is interrupted.\n",
    "                copulation_end = copulation.time_interval[1]\n",
    "                if copulation_end==N_FRAMES:\n",
    "                    print('Copulation interrupted:', item.name)\n",
    "                    continue\n",
    "\n",
    "                # Filter out videos where copulation lasts less than 8 minutes.\n",
    "                copulation_duration = copulation.duration\n",
    "                if copulation_duration <= 8 * 60 * FPS:\n",
    "                    print('Copulation too short:', item.name)\n",
    "                    continue\n",
    "            \n",
    "            except IndexError as error:\n",
    "                continue\n",
    "\n",
    "            experiments[condition].append(item.path.split('_slice')[0])\n",
    "\n",
    "experiments"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Aggression Analysis"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Iteration: 0 \n",
      "Experiment: video_2017-09-05T13_28_41_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 1 \n",
      "Experiment: video_2017-09-05T14_34_55_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 2 \n",
      "Experiment: video_2017-09-06T13_42_13_arena1 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 3 \n",
      "Experiment: video_2017-09-06T14_45_32_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 4 \n",
      "Experiment: video_2017-09-07T14_37_38_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 5 \n",
      "Experiment: video_2017-09-07T14_37_38_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 6 \n",
      "Experiment: video_2017-09-08T13_26_13_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 7 \n",
      "Experiment: video_2017-09-12T13_30_06_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 8 \n",
      "Experiment: video_2017-09-12T14_36_55_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "No aggression for experiment video_2017-09-12T14_36_55_arena3 \n",
      "\n",
      "Iteration: 9 \n",
      "Experiment: video_2017-09-12T16_18_15_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 10 \n",
      "Experiment: video_2017-09-13T14_34_18_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 11 \n",
      "Experiment: video_2017-09-20T13_43_53_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "No aggression for experiment video_2017-09-20T13_43_53_arena3 \n",
      "\n",
      "Iteration: 12 \n",
      "Experiment: video_2017-09-20T14_48_55_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 13 \n",
      "Experiment: video_2017-09-21T13_38_55_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 14 \n",
      "Experiment: video_2017-09-21T15_57_23_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 15 \n",
      "Experiment: video_2017-09-26T13_40_19_arena1 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 16 \n",
      "Experiment: video_2017-09-28T13_36_06_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "No aggression for experiment video_2017-09-28T13_36_06_arena4 \n",
      "\n",
      "Iteration: 17 \n",
      "Experiment: video_2017-09-28T14_44_01_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 18 \n",
      "Experiment: video_2017-09-28T15_55_49_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "No aggression for experiment video_2017-09-28T15_55_49_arena3 \n",
      "\n",
      "Iteration: 19 \n",
      "Experiment: video_2017-10-12T15_50_43_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "No aggression for experiment video_2017-10-12T15_50_43_arena2 \n",
      "\n",
      "Iteration: 20 \n",
      "Experiment: video_2017-10-13T16_06_33_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "No aggression for experiment video_2017-10-13T16_06_33_arena2 \n",
      "\n",
      "Iteration: 21 \n",
      "Experiment: video_2017-10-18T15_19_17_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 22 \n",
      "Experiment: video_2017-10-19T13_50_56_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "No aggression for experiment video_2017-10-19T13_50_56_arena2 \n",
      "\n",
      "Iteration: 23 \n",
      "Experiment: video_2017-10-20T13_21_06_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 24 \n",
      "Experiment: video_2017-10-20T15_44_09_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 25 \n",
      "Experiment: video_2017-10-24T16_13_35_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 26 \n",
      "Experiment: video_2017-10-25T14_55_12_arena1 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 27 \n",
      "Experiment: video_2017-11-02T13_37_48_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 28 \n",
      "Experiment: video_2017-11-02T14_48_28_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 29 \n",
      "Experiment: video_2017-11-02T16_11_06_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 30 \n",
      "Experiment: video_2017-11-03T14_54_45_arena1 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "No aggression for experiment video_2017-11-03T14_54_45_arena1 \n",
      "\n",
      "Iteration: 31 \n",
      "Experiment: video_2017-11-03T16_20_50_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 32 \n",
      "Experiment: video_2017-12-20T12_58_51_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 33 \n",
      "Experiment: video_2017-12-20T14_01_01_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 0 \n",
      "Experiment: video_2017-09-05T13_28_41_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-09-05T13_28_41_arena3 \n",
      "\n",
      "Iteration: 1 \n",
      "Experiment: video_2017-09-07T16_01_26_arena4 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-09-07T16_01_26_arena4 \n",
      "\n",
      "Iteration: 2 \n",
      "Experiment: video_2017-09-08T14_31_59_arena2 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-09-08T14_31_59_arena2 \n",
      "\n",
      "Iteration: 3 \n",
      "Experiment: video_2017-09-08T14_31_59_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 4 \n",
      "Experiment: video_2017-09-12T13_30_06_arena1 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 5 \n",
      "Experiment: video_2017-09-13T15_40_03_arena1 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 6 \n",
      "Experiment: video_2017-09-14T14_47_16_arena4 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-09-14T14_47_16_arena4 \n",
      "\n",
      "Iteration: 7 \n",
      "Experiment: video_2017-09-20T13_43_53_arena1 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-09-20T13_43_53_arena1 \n",
      "\n",
      "Iteration: 8 \n",
      "Experiment: video_2017-09-26T14_52_18_arena2 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 9 \n",
      "Experiment: video_2017-09-27T15_06_20_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-09-27T15_06_20_arena3 \n",
      "\n",
      "Iteration: 10 \n",
      "Experiment: video_2017-10-11T13_30_05_arena1 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-11T13_30_05_arena1 \n",
      "\n",
      "Iteration: 11 \n",
      "Experiment: video_2017-10-11T16_00_50_arena4 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-11T16_00_50_arena4 \n",
      "\n",
      "Iteration: 12 \n",
      "Experiment: video_2017-10-13T14_37_35_arena1 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-13T14_37_35_arena1 \n",
      "\n",
      "Iteration: 13 \n",
      "Experiment: video_2017-10-13T14_37_35_arena2 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-13T14_37_35_arena2 \n",
      "\n",
      "Iteration: 14 \n",
      "Experiment: video_2017-10-13T14_37_35_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-13T14_37_35_arena3 \n",
      "\n",
      "Iteration: 15 \n",
      "Experiment: video_2017-10-19T13_50_56_arena4 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-19T13_50_56_arena4 \n",
      "\n",
      "Iteration: 16 \n",
      "Experiment: video_2017-10-19T14_58_20_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-19T14_58_20_arena3 \n",
      "\n",
      "Iteration: 17 \n",
      "Experiment: video_2017-10-19T16_19_37_arena2 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 18 \n",
      "Experiment: video_2017-10-20T14_31_24_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 19 \n",
      "Experiment: video_2017-10-20T14_31_24_arena4 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-20T14_31_24_arena4 \n",
      "\n",
      "Iteration: 20 \n",
      "Experiment: video_2017-10-24T13_43_26_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-24T13_43_26_arena3 \n",
      "\n",
      "Iteration: 21 \n",
      "Experiment: video_2017-10-25T13_39_35_arena1 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 22 \n",
      "Experiment: video_2017-10-25T14_55_12_arena2 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 23 \n",
      "Experiment: video_2017-10-25T14_55_12_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-25T14_55_12_arena3 \n",
      "\n",
      "Iteration: 24 \n",
      "Experiment: video_2017-10-26T13_35_36_arena2 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 25 \n",
      "Experiment: video_2017-10-26T14_43_16_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 26 \n",
      "Experiment: video_2017-11-03T13_38_06_arena2 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-11-03T13_38_06_arena2 \n",
      "\n",
      "Iteration: 27 \n",
      "Experiment: video_2017-11-03T13_38_06_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-11-03T13_38_06_arena3 \n",
      "\n",
      "Iteration: 28 \n",
      "Experiment: video_2017-11-03T13_38_06_arena4 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 29 \n",
      "Experiment: video_2017-11-03T16_20_50_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 0 \n",
      "Experiment: video_2017-09-06T15_53_34_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-09-06T15_53_34_arena1 \n",
      "\n",
      "Iteration: 1 \n",
      "Experiment: video_2017-09-07T16_01_26_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 2 \n",
      "Experiment: video_2017-09-07T16_01_26_arena2 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 3 \n",
      "Experiment: video_2017-09-08T15_42_18_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-09-08T15_42_18_arena1 \n",
      "\n",
      "Iteration: 4 \n",
      "Experiment: video_2017-09-08T15_42_18_arena3 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 5 \n",
      "Experiment: video_2017-09-13T15_40_03_arena4 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 6 \n",
      "Experiment: video_2017-09-14T15_53_40_arena3 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-09-14T15_53_40_arena3 \n",
      "\n",
      "Iteration: 7 \n",
      "Experiment: video_2017-09-20T16_07_55_arena4 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-09-20T16_07_55_arena4 \n",
      "\n",
      "Iteration: 8 \n",
      "Experiment: video_2017-09-21T15_57_23_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 9 \n",
      "Experiment: video_2017-09-21T15_57_23_arena4 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 10 \n",
      "Experiment: video_2017-09-26T16_06_31_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-09-26T16_06_31_arena1 \n",
      "\n",
      "Iteration: 11 \n",
      "Experiment: video_2017-09-26T16_06_31_arena3 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-09-26T16_06_31_arena3 \n",
      "\n",
      "Iteration: 12 \n",
      "Experiment: video_2017-09-28T15_55_49_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-09-28T15_55_49_arena1 \n",
      "\n",
      "Iteration: 13 \n",
      "Experiment: video_2017-10-11T16_00_50_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-10-11T16_00_50_arena1 \n",
      "\n",
      "Iteration: 14 \n",
      "Experiment: video_2017-10-11T16_00_50_arena2 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-10-11T16_00_50_arena2 \n",
      "\n",
      "Iteration: 15 \n",
      "Experiment: video_2017-10-11T16_00_50_arena3 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-10-11T16_00_50_arena3 \n",
      "\n",
      "Iteration: 16 \n",
      "Experiment: video_2017-10-12T15_50_43_arena4 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-10-12T15_50_43_arena4 \n",
      "\n",
      "Iteration: 17 \n",
      "Experiment: video_2017-10-13T16_06_33_arena4 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-10-13T16_06_33_arena4 \n",
      "\n",
      "Iteration: 18 \n",
      "Experiment: video_2017-10-18T16_37_02_arena3 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-10-18T16_37_02_arena3 \n",
      "\n",
      "Iteration: 19 \n",
      "Experiment: video_2017-10-18T16_37_02_arena4 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 20 \n",
      "Experiment: video_2017-10-19T16_19_37_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 21 \n",
      "Experiment: video_2017-10-19T16_19_37_arena4 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 22 \n",
      "Experiment: video_2017-10-25T16_23_26_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 23 \n",
      "Experiment: video_2017-10-25T16_23_26_arena3 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-10-25T16_23_26_arena3 \n",
      "\n",
      "Iteration: 24 \n",
      "Experiment: video_2017-11-02T16_11_06_arena4 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-11-02T16_11_06_arena4 \n",
      "\n",
      "Iteration: 25 \n",
      "Experiment: video_2017-12-19T15_13_55_arena2 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 26 \n",
      "Experiment: video_2017-12-19T15_13_55_arena3 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 27 \n",
      "Experiment: video_2017-12-19T16_23_33_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 28 \n",
      "Experiment: video_2017-12-19T16_23_33_arena2 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 29 \n",
      "Experiment: video_2017-12-19T16_23_33_arena3 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 30 \n",
      "Experiment: video_2017-12-20T15_08_53_arena2 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 0 \n",
      "Experiment: video_2017-09-05T13_28_41_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 1 \n",
      "Experiment: video_2017-09-05T13_28_41_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 2 \n",
      "Experiment: video_2017-09-06T13_42_13_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-09-06T13_42_13_arena2 \n",
      "\n",
      "Iteration: 3 \n",
      "Experiment: video_2017-09-06T14_45_32_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 4 \n",
      "Experiment: video_2017-09-06T14_45_32_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 5 \n",
      "Experiment: video_2017-09-08T13_26_13_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 6 \n",
      "Experiment: video_2017-09-08T13_26_13_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 7 \n",
      "Experiment: video_2017-09-12T14_36_55_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 8 \n",
      "Experiment: video_2017-09-12T16_18_15_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 9 \n",
      "Experiment: video_2017-09-12T16_18_15_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 10 \n",
      "Experiment: video_2017-09-13T13_31_57_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 11 \n",
      "Experiment: video_2017-09-20T16_07_55_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 12 \n",
      "Experiment: video_2017-09-20T16_07_55_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 13 \n",
      "Experiment: video_2017-09-21T13_38_55_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-09-21T13_38_55_arena2 \n",
      "\n",
      "Iteration: 14 \n",
      "Experiment: video_2017-09-21T14_47_10_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-09-21T14_47_10_arena1 \n",
      "\n",
      "Iteration: 15 \n",
      "Experiment: video_2017-09-26T16_06_31_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-09-26T16_06_31_arena2 \n",
      "\n",
      "Iteration: 16 \n",
      "Experiment: video_2017-10-11T14_44_35_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 17 \n",
      "Experiment: video_2017-10-11T14_44_35_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-10-11T14_44_35_arena2 \n",
      "\n",
      "Iteration: 18 \n",
      "Experiment: video_2017-10-12T13_31_34_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 19 \n",
      "Experiment: video_2017-10-13T13_32_39_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-10-13T13_32_39_arena1 \n",
      "\n",
      "Iteration: 20 \n",
      "Experiment: video_2017-10-18T16_37_02_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-10-18T16_37_02_arena1 \n",
      "\n",
      "Iteration: 21 \n",
      "Experiment: video_2017-10-18T16_37_02_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 22 \n",
      "Experiment: video_2017-10-19T13_50_56_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-10-19T13_50_56_arena1 \n",
      "\n",
      "Iteration: 23 \n",
      "Experiment: video_2017-10-20T14_31_24_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-10-20T14_31_24_arena1 \n",
      "\n",
      "Iteration: 24 \n",
      "Experiment: video_2017-10-20T14_31_24_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 25 \n",
      "Experiment: video_2017-10-26T14_43_16_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 26 \n",
      "Experiment: video_2017-10-26T16_04_34_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-10-26T16_04_34_arena1 \n",
      "\n",
      "Iteration: 27 \n",
      "Experiment: video_2017-10-26T16_04_34_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-10-26T16_04_34_arena2 \n",
      "\n",
      "Iteration: 28 \n",
      "Experiment: video_2017-11-02T14_48_28_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-11-02T14_48_28_arena1 \n",
      "\n",
      "Iteration: 29 \n",
      "Experiment: video_2017-11-02T14_48_28_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-11-02T14_48_28_arena2 \n",
      "\n",
      "Iteration: 30 \n",
      "Experiment: video_2017-12-20T12_58_51_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-12-20T12_58_51_arena1 \n",
      "\n",
      "Iteration: 31 \n",
      "Experiment: video_2017-12-20T14_01_01_arena2 \n",
      "Condition: virgin_added \n",
      "\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>has_aggression</th>\n",
       "      <th>latency</th>\n",
       "      <th>latency_mins</th>\n",
       "      <th>nframes</th>\n",
       "      <th>nbouts</th>\n",
       "      <th>ratio_frames</th>\n",
       "      <th>ratio_bouts</th>\n",
       "      <th>second_female</th>\n",
       "      <th>second_fly_delay</th>\n",
       "      <th>condition</th>\n",
       "      <th>experiment</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>True</td>\n",
       "      <td>31444.0</td>\n",
       "      <td>8.734444</td>\n",
       "      <td>180</td>\n",
       "      <td>1</td>\n",
       "      <td>0.010000</td>\n",
       "      <td>0.2</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-05T13_28_41_arena4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>True</td>\n",
       "      <td>853.0</td>\n",
       "      <td>0.236944</td>\n",
       "      <td>617</td>\n",
       "      <td>10</td>\n",
       "      <td>0.034278</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-05T14_34_55_arena2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>True</td>\n",
       "      <td>11456.0</td>\n",
       "      <td>3.182222</td>\n",
       "      <td>343</td>\n",
       "      <td>6</td>\n",
       "      <td>0.019056</td>\n",
       "      <td>1.2</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-06T13_42_13_arena1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>True</td>\n",
       "      <td>3703.0</td>\n",
       "      <td>1.028611</td>\n",
       "      <td>950</td>\n",
       "      <td>13</td>\n",
       "      <td>0.052778</td>\n",
       "      <td>2.6</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-06T14_45_32_arena3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>True</td>\n",
       "      <td>12260.0</td>\n",
       "      <td>3.405556</td>\n",
       "      <td>579</td>\n",
       "      <td>7</td>\n",
       "      <td>0.032167</td>\n",
       "      <td>1.4</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-07T14_37_38_arena3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>122</th>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.611944</td>\n",
       "      <td>virgin_added</td>\n",
       "      <td>video_2017-10-26T16_04_34_arena2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>123</th>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>3.442222</td>\n",
       "      <td>virgin_added</td>\n",
       "      <td>video_2017-11-02T14_48_28_arena1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>124</th>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>9.632500</td>\n",
       "      <td>virgin_added</td>\n",
       "      <td>video_2017-11-02T14_48_28_arena2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>125</th>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>5.978611</td>\n",
       "      <td>virgin_added</td>\n",
       "      <td>video_2017-12-20T12_58_51_arena1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>126</th>\n",
       "      <td>True</td>\n",
       "      <td>23537.0</td>\n",
       "      <td>6.538056</td>\n",
       "      <td>10</td>\n",
       "      <td>2</td>\n",
       "      <td>0.000556</td>\n",
       "      <td>0.4</td>\n",
       "      <td>82628</td>\n",
       "      <td>3.328056</td>\n",
       "      <td>virgin_added</td>\n",
       "      <td>video_2017-12-20T14_01_01_arena2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>127 rows × 11 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     has_aggression  latency  latency_mins  nframes  nbouts  ratio_frames  \\\n",
       "0              True  31444.0      8.734444      180       1      0.010000   \n",
       "1              True    853.0      0.236944      617      10      0.034278   \n",
       "2              True  11456.0      3.182222      343       6      0.019056   \n",
       "3              True   3703.0      1.028611      950      13      0.052778   \n",
       "4              True  12260.0      3.405556      579       7      0.032167   \n",
       "..              ...      ...           ...      ...     ...           ...   \n",
       "122           False      NaN      0.000000        0       0      0.000000   \n",
       "123           False      NaN      0.000000        0       0      0.000000   \n",
       "124           False      NaN      0.000000        0       0      0.000000   \n",
       "125           False      NaN      0.000000        0       0      0.000000   \n",
       "126            True  23537.0      6.538056       10       2      0.000556   \n",
       "\n",
       "     ratio_bouts  second_female  second_fly_delay      condition  \\\n",
       "0            0.2              0          0.000000  virgin_virgin   \n",
       "1            2.0              0          0.000000  virgin_virgin   \n",
       "2            1.2              0          0.000000  virgin_virgin   \n",
       "3            2.6              0          0.000000  virgin_virgin   \n",
       "4            1.4              0          0.000000  virgin_virgin   \n",
       "..           ...            ...               ...            ...   \n",
       "122          0.0              0          0.611944   virgin_added   \n",
       "123          0.0              0          3.442222   virgin_added   \n",
       "124          0.0              0          9.632500   virgin_added   \n",
       "125          0.0              0          5.978611   virgin_added   \n",
       "126          0.4          82628          3.328056   virgin_added   \n",
       "\n",
       "                           experiment  \n",
       "0    video_2017-09-05T13_28_41_arena4  \n",
       "1    video_2017-09-05T14_34_55_arena2  \n",
       "2    video_2017-09-06T13_42_13_arena1  \n",
       "3    video_2017-09-06T14_45_32_arena3  \n",
       "4    video_2017-09-07T14_37_38_arena3  \n",
       "..                                ...  \n",
       "122  video_2017-10-26T16_04_34_arena2  \n",
       "123  video_2017-11-02T14_48_28_arena1  \n",
       "124  video_2017-11-02T14_48_28_arena2  \n",
       "125  video_2017-12-20T12_58_51_arena1  \n",
       "126  video_2017-12-20T14_01_01_arena2  \n",
       "\n",
       "[127 rows x 11 columns]"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "aggression_df = pd.DataFrame()\n",
    "\n",
    "for condition in condition_order:\n",
    "    for h, experiment_path in enumerate(experiments[condition]):\n",
    "\n",
    "        experiment = os.path.basename(experiment_path)\n",
    "        \n",
    "        print('Iteration:', h, '\\nExperiment:', experiment, '\\nCondition:', condition, '\\n')\n",
    "        \n",
    "        # Read .csv annotation files.\n",
    "        annotation_video = annotations.read(experiment_path + '.csv')\n",
    "        copulation = annotation_video[0].events[0]\n",
    "        aggression_events = annotation_video[1].events\n",
    "        n_events = len(aggression_events)\n",
    "\n",
    "        # In case there is aggression, do the necessary calculations.\n",
    "        if n_events > 0:\n",
    "\n",
    "            if condition=='virgin_added':\n",
    "                new_fly = annotation_video[2].events[0].time\n",
    "                latency =  aggression_events[0].time - new_fly\n",
    "                latency_mins = latency / (60 * FPS)\n",
    "                ratio_frames = sum([aggression.duration for aggression in aggression_events]) / (5 * 60 * FPS)\n",
    "                ratio_bouts = n_events / 5\n",
    "                delay = (new_fly - copulation.time) / (60 * FPS)\n",
    "            else:\n",
    "                new_fly = 0\n",
    "                latency =  aggression_events[0].time - copulation.time\n",
    "                latency_mins = latency / (60 * FPS)\n",
    "                ratio_frames = sum([aggression.duration for aggression in aggression_events]) / (5 * 60 * FPS)\n",
    "                ratio_bouts = n_events / 5\n",
    "                delay = 0\n",
    "\n",
    "            aggression_data = pd.DataFrame({'has_aggression': True,\n",
    "                                            'latency': latency,\n",
    "                                            'latency_mins': latency_mins,\n",
    "                                            'nframes': sum([aggression.duration for aggression in aggression_events]),\n",
    "                                            'nbouts': n_events,\n",
    "                                            'ratio_frames': ratio_frames,\n",
    "                                            'ratio_bouts': ratio_bouts,\n",
    "                                            'second_female': new_fly,\n",
    "                                            'second_fly_delay': delay,\n",
    "                                            'condition': condition,\n",
    "                                            'experiment': experiment},\n",
    "                                            index=[h],\n",
    "                                           )\n",
    "\n",
    "        # If not, preset our dictionary with default values.\n",
    "        else:\n",
    "            print('No aggression for experiment', experiment, '\\n')\n",
    "            if condition=='virgin_added':\n",
    "                new_fly = annotation_video[2].events[0].time\n",
    "                delay = (new_fly - copulation.time) / (60 * FPS)\n",
    "            else:\n",
    "                delay = 0\n",
    "\n",
    "            aggression_data = pd.DataFrame({'has_aggression': False,\n",
    "                                            'latency': np.nan,\n",
    "                                            'latency_mins': 0,\n",
    "                                            'nframes': 0,\n",
    "                                            'nbouts': 0,\n",
    "                                            'ratio_frames': 0, \n",
    "                                            'ratio_bouts': 0,\n",
    "                                            'second_female': 0,\n",
    "                                            'second_fly_delay': delay,\n",
    "                                            'condition': condition,\n",
    "                                            'experiment': experiment},\n",
    "                                            index=[h],\n",
    "                                           )\n",
    "\n",
    "            \n",
    "        # Concatenate all data together.\n",
    "        aggression_df = pd.concat([aggression_df, aggression_data], ignore_index=True)\n",
    "\n",
    "aggression_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>n_aggression</th>\n",
       "      <th>n_experiments</th>\n",
       "      <th>aggression_rate</th>\n",
       "      <th>condition</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>26</td>\n",
       "      <td>34</td>\n",
       "      <td>0.764706</td>\n",
       "      <td>virgin_virgin</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>12</td>\n",
       "      <td>30</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>virgin_mated24h</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>16</td>\n",
       "      <td>31</td>\n",
       "      <td>0.516129</td>\n",
       "      <td>virgin_mated2h</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>18</td>\n",
       "      <td>32</td>\n",
       "      <td>0.562500</td>\n",
       "      <td>virgin_added</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   n_aggression  n_experiments  aggression_rate        condition\n",
       "0            26             34         0.764706    virgin_virgin\n",
       "1            12             30         0.400000  virgin_mated24h\n",
       "2            16             31         0.516129   virgin_mated2h\n",
       "3            18             32         0.562500     virgin_added"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Re-arrange original aggression DataFrame to get aggression rate.\n",
    "aggression_rate_df = pd.DataFrame()\n",
    "has_aggression_list = []\n",
    "for condition in condition_order:\n",
    "    \n",
    "    aggression_column = aggression_df[aggression_df['condition']==condition]\n",
    "    n_exp = aggression_column.shape[0]\n",
    "    \n",
    "    has_aggression = aggression_column[aggression_column['has_aggression']==True]\n",
    "    n_aggression = has_aggression.shape[0]\n",
    "    has_aggression_list.append(n_aggression)\n",
    "    aggression_rate = n_aggression / n_exp\n",
    "    rate_data = pd.DataFrame({'n_aggression': n_aggression,\n",
    "                              'n_experiments': n_exp,\n",
    "                              'aggression_rate': aggression_rate,\n",
    "                              'condition': condition,\n",
    "                             }, index=[0])\n",
    "\n",
    "    aggression_rate_df = pd.concat([aggression_rate_df, rate_data], ignore_index=True)\n",
    "\n",
    "aggression_rate_df = aggression_rate_df[['n_aggression', 'n_experiments', 'aggression_rate', 'condition']]\n",
    "aggression_rate_df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## How many frames of aggression do we observe?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>condition</th>\n",
       "      <th>ratio_frames</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>0.010000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>0.034278</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>0.019056</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>0.052778</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>0.032167</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>121</th>\n",
       "      <td>virgin_added</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>122</th>\n",
       "      <td>virgin_added</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>123</th>\n",
       "      <td>virgin_added</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>125</th>\n",
       "      <td>virgin_added</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>126</th>\n",
       "      <td>virgin_added</td>\n",
       "      <td>0.000556</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>124 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         condition  ratio_frames\n",
       "0    virgin_virgin      0.010000\n",
       "1    virgin_virgin      0.034278\n",
       "2    virgin_virgin      0.019056\n",
       "3    virgin_virgin      0.052778\n",
       "4    virgin_virgin      0.032167\n",
       "..             ...           ...\n",
       "121   virgin_added      0.000000\n",
       "122   virgin_added      0.000000\n",
       "123   virgin_added      0.000000\n",
       "125   virgin_added      0.000000\n",
       "126   virgin_added      0.000556\n",
       "\n",
       "[124 rows x 2 columns]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ratio_frames_df = aggression_df.copy()\n",
    "ratio_frames_df = ratio_frames_df.query('second_fly_delay<8')\n",
    "ratio_frames_df = ratio_frames_df[['condition', 'ratio_frames']]\n",
    "ratio_frames_df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Statistics"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\t virgin_mated24h \n",
      "\n",
      "Shapiro's Test: group 1 IS NOT normally distributed.\n",
      "D'Agostino's Test: group 1 IS NOT normally distributed.\n",
      "Shapiro's Test: group 2 IS NOT normally distributed.\n",
      "D'Agostino's Test: group 2 IS NOT normally distributed.\n",
      "Levene's Test for non-normally distributed samples:\n",
      "  p-value = 0.000411\n",
      "  All groups were sampled from populations with NOT IDENTICAL variances.\n",
      "\n",
      "Mann-Whitney p-value: 0.00020715099814824003 \n",
      "\n",
      "\n",
      "\t virgin_mated2h \n",
      "\n",
      "Shapiro's Test: group 1 IS NOT normally distributed.\n",
      "D'Agostino's Test: group 1 IS NOT normally distributed.\n",
      "Shapiro's Test: group 2 IS NOT normally distributed.\n",
      "D'Agostino's Test: group 2 IS NOT normally distributed.\n",
      "Levene's Test for non-normally distributed samples:\n",
      "  p-value = 0.000088\n",
      "  All groups were sampled from populations with NOT IDENTICAL variances.\n",
      "\n",
      "Mann-Whitney p-value: 0.00045273545868872167 \n",
      "\n",
      "\n",
      "\t virgin_added \n",
      "\n",
      "Shapiro's Test: group 1 IS NOT normally distributed.\n",
      "D'Agostino's Test: group 1 IS NOT normally distributed.\n",
      "Shapiro's Test: group 2 IS NOT normally distributed.\n",
      "D'Agostino's Test: group 2 IS NOT normally distributed.\n",
      "Levene's Test for non-normally distributed samples:\n",
      "  p-value = 0.000137\n",
      "  All groups were sampled from populations with NOT IDENTICAL variances.\n",
      "\n",
      "Mann-Whitney p-value: 0.0011237811919858555 \n",
      "\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'virgin_mated24h': 0.00020715099814824003,\n",
       " 'virgin_mated2h': 0.00045273545868872167,\n",
       " 'virgin_added': 0.0011237811919858555}"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "frames_pvalues = {}\n",
    "\n",
    "control = ratio_frames_df.query('condition==\"virgin_virgin\"')['ratio_frames']\n",
    "\n",
    "for condition in condition_order[1:]:\n",
    "        \n",
    "    print('\\n\\t', condition, '\\n')\n",
    "\n",
    "    try:\n",
    "        test = ratio_frames_df.query('condition==\"' + condition + '\"')['ratio_frames']\n",
    "\n",
    "        temp_values = {'control': control, 'test': test}\n",
    "\n",
    "        pvalue_condition = helpers.run_statistics(temp_values)\n",
    "\n",
    "        frames_pvalues[condition] = pvalue_condition\n",
    "        \n",
    "    except ValueError as error:\n",
    "        print(error)\n",
    "    \n",
    "frames_pvalues"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Bonferroni Correction\n",
      "---------------------\n",
      "\n",
      "\tOriginal Values:\n",
      " {'virgin_mated24h': 0.00020715099814824003, 'virgin_mated2h': 0.00045273545868872167, 'virgin_added': 0.0011237811919858555}\n",
      "\n",
      "\tCorrected Values:\n",
      " {'virgin_mated24h': 0.0006214529944447201, 'virgin_mated2h': 0.001358206376066165, 'virgin_added': 0.0033713435759575665} \n",
      "\n"
     ]
    }
   ],
   "source": [
    "# Bonferroni corretction for multiple comparisons.\n",
    "title = 'Bonferroni Correction'\n",
    "print(title)\n",
    "print('-'*len(title))\n",
    "\n",
    "# Show uncorrected values.\n",
    "print('\\n\\tOriginal Values:\\n', frames_pvalues)\n",
    "\n",
    "# Apply the bonferroni correction for multiple comparisons.\n",
    "frames_multi_comp_correction = multipletests(pvals=list(frames_pvalues.values()), alpha=0.05, method='bonferroni')[1]\n",
    "\n",
    "# Transform the correction results into a dictionary.\n",
    "corrected_frames_pvalues = dict(zip(list(frames_pvalues.keys()), frames_multi_comp_correction))\n",
    "\n",
    "# Show corrected values.\n",
    "print('\\n\\tCorrected Values:\\n', corrected_frames_pvalues, '\\n')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Effect Size"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "virgin_mated24h\n",
      "Large Efect: -1.0 \n",
      "\n",
      "virgin_mated2h\n",
      "Large Efect: -0.9503105590062111 \n",
      "\n",
      "virgin_added\n",
      "Large Efect: -0.8881987577639753 \n",
      "\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'virgin_mated24h': -1.0,\n",
       " 'virgin_mated2h': -0.9503105590062111,\n",
       " 'virgin_added': -0.8881987577639753}"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "frames_effect_sizes = {}\n",
    "\n",
    "control = ratio_frames_df.query('condition==\"virgin_virgin\"')['ratio_frames']\n",
    "\n",
    "for condition in condition_order[1:]:\n",
    "    \n",
    "    print(condition)\n",
    "    \n",
    "    test = ratio_frames_df.query('condition==\"' + condition + '\"')['ratio_frames']\n",
    "\n",
    "    median_diff = helpers.get_effect_size(control, test, method='median_diff')\n",
    "    \n",
    "    frames_effect_sizes[condition] = median_diff\n",
    "    \n",
    "frames_effect_sizes"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Plot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUQAAAEgCAYAAADMjwqKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdG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h+ikpKYkbwVJVVQW5XM7VyQQ6qh6dPHkSe/fuxYYNGyAQCFBWVoa1a9fiypUrWtc5atQo/Pjjj5BIJPjjH/84KPuhDUuIDMP0y5w5c3Du3LkeRZa7e7LIclJSEoDnL7J87949Hbb+6VhCZBimX17lIsssITIM02+vapFlNnSPYZh+e1WLLLPbbhiG0ZkDBw5g/PjxCAoKQk1NDUJDQ3Hjxo0hW1eUHSEyDKMzL1uRZXaEyDAM02nopmqGYZhBxhIiwzBMJ5YQGYZhOv0/LTnNut4fnFIAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 360x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Initialize figure.\n",
    "n_conditions = ratio_frames_df['condition'].nunique()\n",
    "figure, axis = plt.subplots(figsize=(1.25*n_conditions, 4))\n",
    "\n",
    "# Draw the boxplot.\n",
    "sns.boxplot(x='condition',\n",
    "            y='ratio_frames',\n",
    "            data=ratio_frames_df,\n",
    "            palette=['steelblue', '#d72323', '#fB929e', '#1a535c'],\n",
    "            order=ratio_frames_df['condition'].unique(),\n",
    "            width=0.6,\n",
    "            showfliers=False,\n",
    "            boxprops={'edgecolor': INK},\n",
    "            medianprops={'color': INK},\n",
    "            whiskerprops={'color': INK},\n",
    "            capprops={'color': INK}\n",
    "           )\n",
    "\n",
    "# Draw the swarmplot.\n",
    "sns.swarmplot(x='condition',\n",
    "              y='ratio_frames',\n",
    "              data=ratio_frames_df,\n",
    "              order=ratio_frames_df['condition'].unique(),\n",
    "              palette=['steelblue', '#d72323', '#fB929e', '#1a535c'],\n",
    "              linewidth=0.75,\n",
    "              edgecolor=INK\n",
    "             )\n",
    "\n",
    "# Figure and axes formatting.\n",
    "axis.set_xlabel('')\n",
    "axis.set_xticklabels([''])\n",
    "axis.set_ylabel('Aggression Rate (%)')\n",
    "axis.set_ylim(0, 0.06)\n",
    "axis.set_yticks(np.arange(0, 0.06+0.001, 0.01))\n",
    "axis.set_yticklabels([int(y*100) for y in axis.get_yticks()])\n",
    "\n",
    "# Table definition.\n",
    "row1 = [str(ratio_frames_df.query('condition==\"'+condition+'\"').shape[0]) for condition in ratio_frames_df['condition'].unique()]\n",
    "row2 = ['virgin\\n', '24h-mated\\n', '2h-mated\\n', '\\ncourtship-\\n-deprived\\nvirgin\\n'] \n",
    "cell_text = np.array([row1, row2])\n",
    "\n",
    "row_labels = ['n =', '']\n",
    "summary_table = axis.table(cellText= cell_text,\n",
    "                           cellLoc='center',\n",
    "                           rowLabels=row_labels,\n",
    "                           rowLoc='center',\n",
    "                           colLoc='center'\n",
    "                          )\n",
    "\n",
    "summary_table.auto_set_font_size(False)\n",
    "summary_table.set_fontsize(11)\n",
    "\n",
    "properties = summary_table.properties()\n",
    "table_cells = properties['children']\n",
    "for cell in table_cells:\n",
    "    cell.set_height(0.12)\n",
    "    cell.set_alpha(0)\n",
    "\n",
    "# Draw statistical results.\n",
    "for p, condition in enumerate(condition_order[1:]):\n",
    "    sig_height = 6 if (corrected_frames_pvalues.get(condition, 'NaN') == 'NaN') or (corrected_frames_pvalues.get(condition, 'NaN') >= 0.05) else 2\n",
    "    helpers.plot_stattest_result(ax=axis,\n",
    "                                 x1=p+1,\n",
    "                                 x2=p+1,\n",
    "                                 p_value=corrected_frames_pvalues.get(condition, 'NaN'),\n",
    "                                 y=0.055,\n",
    "                                 ticksize=0,\n",
    "                                 xytext=(0,sig_height),\n",
    "                                 fontsize=13,\n",
    "                                 color=INK,\n",
    "                                 connector_color=INK\n",
    "                                )\n",
    "\n",
    "# Saving parameters.\n",
    "filename = 'aggression_rate_first_5mins_mating_drive'\n",
    "plt.savefig(os.path.join(savepath, filename))\n",
    "\n",
    "plt.show()\n",
    "plt.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
